<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%
    String path = request.getContextPath();
			String basePath = request.getScheme() + "://"
					+ request.getServerName() + ":" + request.getServerPort()
					+ path + "/";
			if (80 == request.getServerPort()) {
				basePath = request.getScheme() + "://"
						+ request.getServerName() + path + "/";
			}
			response.setHeader("Pragma", "no-cache");
			response.setDateHeader("Expires", 0);
			response.setHeader("Cache-Control",
					"no-store,no-cache,must-revalidate");
%>
<script type="text/javascript"
	src='<%=request.getContextPath()%>/js/js.js'></script>
<script type="text/javascript"
	src='<%=request.getContextPath()%>/js/jquery-1.7.1.js'></script>
<script type="text/javascript">
	$(document).ready(function() {
		$(".bodycontent").delay(500).fadeIn(1000, function() {
			//显示
			$(".bodycontent").attr("display","block");
		});
	});
	function exit() {
		$("body").fadeOut("fast", function() {
			window.location.href = "./logout.action";
		});
	}
	function reExit()
	{
		$("body").fadeOut("fast", function() {
			window.location.href = "./loginJsp.action";
		});
	}
</script>
<link rel="stylesheet" href="<%=request.getContextPath()%>/css/css.css" />
<div class="head">
	<div style="text-align: center;">
		<h2>
			<label>
				在线考试系统
			</label>
		</h2>
	</div>
	<div style="text-align: left; border-bottom: 1px dashed #6c6c6c;">
		<span style="margin-left: 20px;"> <s:if
				test="#session.user != null">
				<label>
					用户名：
				</label>
				<s:property value="#session.user.u_name" />
					&nbsp;&nbsp;|&nbsp;&nbsp;
					<label>
					用户类型：
				</label>
				<s:if test="#session.user.u_type == 1">
					<label>
						教师
					</label>
				</s:if>
				<s:if test="#session.user.u_type == 0">
					<label>
						学生
					</label>
				</s:if>
			</s:if> <s:else>
				<label>
					请登录
				</label>
			</s:else> </span>
		<span style="float: right; margin-right: 40px;"> 
			<s:if test="#session.user != null">
				<a onclick="exit();">
					<label>
						退出
					</label>
				</a> | 
				<a onclick="reExit();">
					<label>
						重新登录
					</label> 
				</a>
			</s:if> 
			<s:else>
				<a href="./loginJsp.action">
					<label>
						登录
					</label> 
				</a> | 
				<a href="./regeditJsp.action">
					<label>
						注册
					</label>
				</a>
			</s:else> 
		</span>
	</div>
</div>


